class_name WeaponState
extends AtomicState

@export var cooling_time_data_name:String = ""
var state_manager:WeaponC_StateManager

func state_init(fsm:FSM):
	super.state_init(fsm)
	state_manager = fsm.cur_owner as WeaponC_StateManager
func on_enter(from_state:State):
	super.on_enter(from_state)
	if cooling_time_data_name != "":
		var ct = state_manager.weapon.get_entity_data()[cooling_time_data_name]
		if ct:
			cooling_time = ct
func on_update(delta:float):
	super.on_update(delta)
func on_physics_update(delta:float):
	super.on_physics_update(delta)
func on_exit(to_state:State):
	super.on_exit(to_state)
func get_state_status() -> GameEnum.StateStatus:
	return super.get_state_status()
